﻿using Caliburn.Micro;
using myapp.Events;
using myapp.Events.ViewModel;
using myapp.Instances;
using myapp.ViewModels;
using myappcore.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace myapp.ViewModels
{
    /// <summary>
    /// Possition view model
    /// </summary>
    public class PossitionViewModel : IBaseContentViewModel
    {
        #region Attribute

        #endregion

        #region Properties

        /// <summary>
        /// Data of possition
        /// </summary>
        public Possition Possition { get; set; }

        #endregion

        #region Contructor

        #endregion

        #region Method
        public void PossitionSelected()
        {
            OrderManagerViewModel view = OrderManagerViewModel.Instance;
            view.Possition = Possition;
            MainInstance.Instance.EventAggregator.Publish(new ViewModelChangedEvent()
            {
                ViewModelChanged = view
            });
            CurrentColor = MainInstance.Instance.ColorConfig.PosstionSelected;
        }
        #endregion
    }
}
